package com.yanqu.road.server.cmd.activity.liondance;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.commonactivity.CommonActivityProto;
import com.yanqu.road.server.cmd.base.AbstractCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.gameplayer.GamePlayer;
import com.yanqu.road.server.gameplayer.module.activity.liondance.LionDanceModule;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.S_LION_DANCE_GET_GET_MY_SCORE_RANK_FROM_CROSS, desc = "我的排名（最高积分）")
public class LionDanceGetMyRankCmdFromCross extends AbstractCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(GamePlayer player, YanQuMessage packet) throws Exception {
        CommonActivityProto.CommonActivityRankListRespMsg respMsg = CommonActivityProto.CommonActivityRankListRespMsg.parseFrom(packet.getBytes());
        player.getModule(LionDanceModule.class).setMyMaxRank(respMsg.getMyRank());
    }

    @Override
    public void sendData(GamePlayer player) {

    }
}
